import type { RouteLocationNormalized as RR } from "vue-router";
import useUserStore from "@/store/user";


// 使用路由的  meta  信息
export const checkUserLogin = (to: RR, from: RR) => {
    if (to.meta.nologin) {
      return true;
    }
    const userStore = useUserStore();
    if (!userStore.token) {
      return "/login";
    }
  };
